<?php
/**
* @package djtpl
* @author J.Ducastel <jeremie@ducastel.name>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

/**
* templates storage for kits
* @uses djtplTemplate
*/
class DjtplStorage extends WakStorage {
/*--------------------------------------------------------------------
 STATIC METHODS
--------------------------------------------------------------------*/
	function & factory($kit,$cfg=null) {
		$tool=&new DjtplStorage($kit,$cfg);
		// registering to DjTpl
		// DjTpl::addStorage($tool);
		return $tool;
	}
/*--------------------------------------------------------------------
PUBLIC INSTANCE METHODS
--------------------------------------------------------------------*/
	/**
	*
	* @param
	* @access public
	* @return
	* /
	function () {

	}/**/
/*--------------------------------------------------------------------
VARS / MEMBERS
--------------------------------------------------------------------*/
	/**
	* @var type desc
	*/
	var $cfg=array(
		'storage'=>array(
			'search'=>'templates/{{lang}/}{{id}}.djtpl.html'
			,'class'=>'DjtplTemplate'));
/*--------------------------------------------------------------------
PRIVATE / PROTECTED METHODS
--------------------------------------------------------------------*/
	/**
	* item factory method
	* @param string $file
	* @access protected
	* @return djtplTemplate
	*/
	function & _itemFactory($file) {
		$str=join('',file($file));
		$tpl=&new DjtplTemplate($str);
		$tpl->setStorage($this);
		return $tpl;
	}/**/

	/**
	*
	* @param
	* @access protected
	* @return
	* /
	function () {

	}/**/
}
?>